from library.api.db import EntityModel, db


class InterfaceCaseRelation(EntityModel):
    ACTIVE = 0
    DISABLE = 1
    
    case_id = db.Column(db.Integer, comment='接口用例id')
    case_name = db.Column(db.String(52), comment='用例信息名称')
    num = db.Column(db.Integer(), nullable=True, comment='步骤序号，执行顺序按序号来')
    relation_case_id = db.Column(db.Integer, comment='关联的模块用例id')
    status = db.Column(db.String(16), comment='状态，true表示执行，false表示不执行')
    type = db.Column(db.String(52), comment='类型action')
    times = db.Column(db.Integer(), comment='执行次数,先保留此字段')
    execute_status = db.Column(db.Integer, default=ACTIVE, comment='状态')
